package org.example.Server.utils;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class CheckIP {
    /**
     * 检查到底是不是本地IP在运行服务器
     *
     * @return
     */
    public static boolean isLocalIP() {
        String ipAddress = "";
        try {
            InetAddress inetAddress = InetAddress.getLocalHost();
            ipAddress = inetAddress.getHostAddress();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        if(ipAddress.equals("192.168.134.1")) return true;
        return false;
    }
}
